{% extends 'layout.html' %}
{% load static %}
{% load permission %}
{% load color %}
{% block content %}
<div style="margin-bottom: 5px" class="clearfix">

<form class="form-inline right" method="get">
  <div class="form-group">
    <label class="sr-only" for="exampleInputEmail3">Email address</label>
    <input type="text" name="keyword" class="form-control" id="exampleInputEmail3" placeholder="请输入需要查找的内容" value="{{ keyword }}">
  </div>
  <button type="submit" class="btn btn-default glyphicon glyphicon-search"></button>
</form>

</div>
    <table class="table table-bordered">
        <thead>
        <tr>
            <th>ID</th>
            <th>类型</th>
            <th>订单号</th>
            <th>金额</th>
            <th>创建时间</th>
            <th>备注</th>
        </tr>
        </thead>
        <tbody>
        {% for row in pager.queryset %}
            <tr row-id="{{ row.id }}">
                <td>{{ row.id }}</td>
                <td>
                    <span class="btn btn-xs btn-{{ row.charge_type|color }}">{{ row.get_charge_type_display }}</span>
                </td>
                <td>
                    {% if row.order_oid %}
                    {{ row.order_oid }}
                    {% else %}
                    -
                    {% endif %}
                </td>
                <td>{{ row.amount }}</td>
                <td>{{ row.create_datetime|date:"Y-m-d" }}</td>
                <td>
                    {% if row.memo %}
                    {{ row.memo }}
                    {% else %}
                    -
                    {% endif %}
                </td>

            </tr>
        {% endfor %}

        </tbody>
    </table>

<nav aria-label="Page navigation">
  <ul class="pagination">
    {{ pager.html }}
  </ul>
</nav>

{% endblock %}



